home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
doom
/
server_1.zip
/
_LEVSEL.QC
< prev
next >
Wrap
Text File
|
1996-10-04
|
7KB
|
169 lines
/*
**
** _levsel.qc (LevelSelect Code, 1.1)
**
** Copyright (C) 1996 Johannes Plass
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/
//==============================================================
// Defaults
//==============================================================
// To provide your own list of levels which are to to be played
// on your server please modify the function 'LevelSelectSelectLevel'
// below. At the end of this function you will find some
// examples which tell you how to do it.
//==============================================================
// LevelSelectInfo
//==============================================================
void(entity player) LevelSelectInit =
{
if (!USE_MODULE_LEVELSELECT) return;
// nothing to do
};
//==============================================================
// LevelSelectInit
//==============================================================
void(entity player) LevelSelectInfo =
{
if (!USE_MODULE_LEVELSELECT) return;
// nothing to do
};
//==============================================================
// LevelSelectActiveMessage
//==============================================================
void(entity player) LevelSelectActiveMessage =
{
if (!USE_MODULE_LEVELSELECT) return;
// 123456789#123456789#123456789#12345678
sprint(player," LevelSelect\n");
};
//==============================================================
// LevelSelectSelectLevel
//==============================================================
void() LevelSelectSelectLevel =
{
if (!USE_MODULE_LEVELSELECT) return;
// 'mapname' is the name of the level which just ended
// 'nextmap' is the name of the map quake proposes to be the next one
// DEATHMATCH LEVELS, END LEVEL
if ( nextmap == "end" ) nextmap = "dm2" ;
else if (mapname == "dm6" ) nextmap = "end" ;
else if (mapname == "end" ) nextmap = "start" ;
};
/*
========================================================================
EXAMPLE 1
========================================================================
Assume you only want to play the levels dm2, e1m2, e4m3 and e3m1
and exactly in this order. Then just paste the following lines
into the function 'LevelSelectSelectLevel' above:
if (mapname == "dm2" ) nextmap = "e1m2" ;
else if (mapname == "e1m2" ) nextmap = "e4m3" ;
else if (mapname == "e4m3" ) nextmap = "e3m1" ;
else nextmap = "dm2" ;
Don't forget to start your server with the '+map dm2' command line
option.
===========================================================================
*/
/*
========================================================================
EXAMPLE 2
========================================================================
if ( nextmap == "end" ) nextmap = "dm1" ;
else if (mapname == "dm6" ) nextmap = "end" ;
else if (mapname == "end" ) nextmap = "start" ;
else if ( nextmap == "e1m1" ) nextmap = "e1m2" ;
else if (mapname == "e1m3" ) nextmap = "e1m5" ;
else if (mapname == "e1m7" ) nextmap = "e1m8" ;
else if (mapname == "e1m8" ) nextmap = "start" ;
What it does:
Line 1: When Quake wants to play the level "end", we will go to level
"dm1" instead.
Line 2: When map "dm6" has ended, Quake usually wants to go to level
"dm1". But no, we prefer to branch to level "end".
Line 3: Quake proposes level "e1m1". No, it's ugly, we skip that one
and go to "e1m2" immediately.
Line 4: The map "e1m3" just ended. This level has two exits, branching
to "e1m8" and "e1m4".
No, we don't like "e1m4" in deathmatch and "e1m8" will be played
later, so we go to "e1m5" now.
Line 5: Level "e1m7" just ended and Quake wants to go back to the "start"
now. We override this and play the secret level "e1m8".
Line 6: After playing the secret level "e1m8", Quake wants us to play
"e1m5". However, we already visited this one earlier, so let's
go the the "start" level.
===========================================================================
*/
/*
// EPISODE 1
else if ( nextmap == "e1m1" ) nextmap = "e1m2" ;
else if (mapname == "e1m3" ) nextmap = "e1m5" ;
else if (mapname == "e1m7" ) nextmap = "e1m8" ;
else if (mapname == "e1m8" ) nextmap = "start" ;
// EPISODE 2
else if ( nextmap == "e2m1" ) nextmap = "e2m7" ;
else if (mapname == "e2m7" ) nextmap = "e2m1" ;
else if (mapname == "e2m1" ) nextmap = "e2m2" ;
else if (mapname == "e2m2" ) nextmap = "e2m3" ;
else if (mapname == "e2m3" ) nextmap = "e2m4" ;
else if (mapname == "e2m4" ) nextmap = "e2m5" ;
else if (mapname == "e2m5" ) nextmap = "start" ;
// EPISODE 3
else if (mapname == "e3m1" ) nextmap = "e3m5" ;
else if (mapname == "e3m5" ) nextmap = "e3m6" ;
else if (mapname == "e3m6" ) nextmap = "e3m7" ;
else if (mapname == "e3m7" ) nextmap = "start" ;
// EPISODE 4
else if (mapname == "e4m1" ) nextmap = "e4m8" ;
else if (mapname == "e4m8" ) nextmap = "e4m2" ;
else if (mapname == "e4m2" ) nextmap = "e4m3" ;
else if (mapname == "e4m3" ) nextmap = "e4m4" ;
else if (mapname == "e4m4" ) nextmap = "e4m6" ;
else if (mapname == "e4m6" ) nextmap = "e4m7" ;
else if (mapname == "e4m7" ) nextmap = "start" ;
*/